﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace _0712502_0712504_DesignPatternGame
{
    public class TankBodyModel : GameModel
    {
        public IDTank idTank;
        public IDTankbody idTankbody ;
        public int Amor;
        public int Damage;

        public TankBodyModel(IDTankbody idBody, int amor, int damage)
        {          
            this.idTankbody = idBody;
            this.Amor = amor;
            this.Damage = damage;
        }

        public TankBodyModel()
        {
        }

        public TankBodyModel(MySprite spriteModel)
        {            
            this.SpriteModel = spriteModel;
        }

        public override VisibleGameEntity Clone()
        {           
            //return this.MemberwiseClone() as GameModel;
            TankBodyModel body = new TankBodyModel();
            
            body.SpriteModel = new MySprite(this.SpriteModel.Texture2ds, new Rectangle(0, 0, 54, 54), new Vector2(27, 27));
            body.SpriteModel.itexture2d = this.SpriteModel.itexture2d;
            body.idTank = this.idTank;
            body.idTankbody = this.idTankbody;
            
            return body;
        }
    }
}
